Setup

Packages used

if (!require("pacman", quietly = TRUE)) {
  install.packages("pacman")
}

pacman::p_load(
  tidyverse, # Used for basic data handling and visualization.
  table1, #Used to create table of descriptive characteristics of sample.
  RColorBrewer, #Color palettes for data visualization. 
  gridExtra, #Used to arrange multiple ggplots in a grid.  
  grid, #Used to arrange multiple ggplots in a grid.
  rnaturalearth, #Used to extract geographical data to create maps. 
  sf, #Used together with the prior package to create map. 
  plotly, #Used together with prior two packages to create map.  
  flextable, #Used to export tables.  
  officer  #Used to export tables.
)
Session
## R version 4.3.2 (2023-10-31 ucrt)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 11 x64 (build 22621)
## 
## Matrix products: default
## 
## 
## locale:
## [1] LC_COLLATE=Spanish_Mexico.utf8  LC_CTYPE=Spanish_Mexico.utf8   
## [3] LC_MONETARY=Spanish_Mexico.utf8 LC_NUMERIC=C                   
## [5] LC_TIME=Spanish_Mexico.utf8    
## 
## time zone: Europe/Berlin
## tzcode source: internal
## 
## attached base packages:
## [1] grid      stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] officer_0.6.3       flextable_0.9.4     plotly_4.10.3      
##  [4] sf_1.0-14           rnaturalearth_0.3.4 gridExtra_2.3      
##  [7] RColorBrewer_1.1-3  table1_1.4.3        lubridate_1.9.3    
## [10] forcats_1.0.0       stringr_1.5.0       dplyr_1.1.3        
## [13] purrr_1.0.2         readr_2.1.4         tidyr_1.3.0        
## [16] tibble_3.2.1        ggplot2_3.4.4       tidyverse_2.0.0    
## [19] pacman_0.5.1

State of residence of participants

Map generated with the accompanying script Map_USA_Canada.R

This map was built by partly using code adapted from contribution by cpsievert.

Distribution of numerical variables

Distributions were examined with the accompanying sourced function distribution_numerical_variables.R

Near normal distribution:
- Age: light tails
- height: heavy right tail, 4 outliers right
- hb: heavy tails, bilateral outliers
- hct: heavy tails, bilateral outliers
- leu: near normal, bilateral outliers
- neu_absolute: heavy right tail, two right outliers
- linf_absolute: heavy right tail, bilateral outliers (more right)
- mon_absolute: heavy right tail, bilateral outliers (more right)
- platelets: two right outliers
- urea: four right outliers
- creatinine: three right outliers

Distribution not normal:
- Weight: right-skewed, outliers are verified observations of extreme weight.
- BMI: right-skewed, outliers are verified observations of extreme BMI.
- spo2_VPO: Left-skewed
- neu_percent: left-skewed
- linf_percent: right-skewed
- glucose: right-skewed
- mon_percent: observations around only 5 data points. Will not use this variable, only absolute monocytes will be used.
- altitude: distribution not clear as values are quite apart an concentrate around single states with diferring mean altitudes. Will attempt to model a smooth term or categorical term in subsequent analyses.

Outcome variable:
- atelectasis_percent: Zero-inflated. Would be difficult to manage as categorical ordinal due to low number of patients in some categories. Will re-assess alongside subsequent analyses to decide.

Table 1

Table 1 generated with the accompanying sourced script table1_arguments.R

Characteristics of participants are shown for the total sample and by obesity class category as defined by the World Health Organization:

  • Class 1, BMI [30,35) kg/m2
  • Class 2, BMI [35,40) kg/m2
  • Class 3, BMI >40 kg/m2
Table 1. Clinical characteristics of patients, according to obesity class.
Total
(N=236)
Class 1 Obesity
(N=62)
Class 2 Obesity
(N=53)
Class 3 Obesity
(N=121)

Assess Respiratory Risk in Surgical Patients in Catalonia (ARISCAT)

body-mass index (BMI)

coronavirus disease (COVID-19)

COVID-19 Reporting and Data System (CO-RADS)

lap-band to gastric sleeve (LBGS)

one anastomosis gastric bypass (OAGB)

peripheral saturation of oxygen (SpO2)

roux-en-Y gastric bypass (RYGB)

sleeve gastrectomy (SG)

white blood cell (WBC)

25th percentile (Q1)

75th percentile (Q3)

interquartile range (IQR)

percentage (%)

standard deviation (SD)

Sex
Man 22 (9.3%) 2 (3.2%) 5 (9.4%) 15 (12.4%)
Woman 214 (90.7%) 60 (96.8%) 48 (90.6%) 106 (87.6%)
Age (years)
Mean (SD) 40.3 (9.87) 42.1 (10.3) 40.8 (9.25) 39.1 (9.82)
Weight (kilograms (kg))
Median [Q1, Q3] 111 [97.4, 130] 88.8 [84.2, 95.7] 107 [102, 112] 128 [114, 142]
Height (meters (m))
Mean (SD) 1.67 (0.0822) 1.66 (0.0631) 1.69 (0.0856) 1.67 (0.0889)
Body mass index (kg/m²)
Median [Q1, Q3] 40.3 [34.6, 46.0] 33.0 [31.5, 33.8] 38.3 [36.6, 39.1] 45.6 [42.2, 51.1]
Surgical procedure
LBGS 31 (13.1%) 5 (8.1%) 9 (17.0%) 17 (14.0%)
OAGB 5 (2.1%) 1 (1.6%) 1 (1.9%) 3 (2.5%)
RYGB 6 (2.5%) 1 (1.6%) 1 (1.9%) 4 (3.3%)
SG 189 (80.1%) 52 (83.9%) 41 (77.4%) 96 (79.3%)
ARISCAT risk group
Intermediate Risk 61 (25.8%) 18 (29.0%) 12 (22.6%) 31 (25.6%)
Low Risk 175 (74.2%) 44 (71.0%) 41 (77.4%) 90 (74.4%)
Oxygen saturation (SpO2) (%)
Median [Q1, Q3] 96.0 [93.0, 97.0] 97.0 [95.0, 97.8] 96.0 [94.0, 97.0] 94.0 [92.0, 97.0]
Mean altitude (meters)
Median [Q1, Q3] 519 [519, 806] 519 [313, 806] 519 [519, 885] 519 [519, 806]
Hypertension
No 177 (75.0%) 52 (83.9%) 40 (75.5%) 85 (70.2%)
Yes 59 (25.0%) 10 (16.1%) 13 (24.5%) 36 (29.8%)
Diabetes
No 211 (89.4%) 58 (93.5%) 48 (90.6%) 105 (86.8%)
Yes 25 (10.6%) 4 (6.5%) 5 (9.4%) 16 (13.2%)
Obstructive sleep apnea
No 218 (92.4%) 60 (96.8%) 50 (94.3%) 108 (89.3%)
Yes 18 (7.6%) 2 (3.2%) 3 (5.7%) 13 (10.7%)
Hypothyroidism
No 213 (90.3%) 55 (88.7%) 50 (94.3%) 108 (89.3%)
Yes 23 (9.7%) 7 (11.3%) 3 (5.7%) 13 (10.7%)
Dyslipidemia
No 218 (92.4%) 58 (93.5%) 48 (90.6%) 112 (92.6%)
Yes 18 (7.6%) 4 (6.5%) 5 (9.4%) 9 (7.4%)
Antidepressants use
No 142 (60.2%) 36 (58.1%) 33 (62.3%) 73 (60.3%)
Yes 94 (39.8%) 26 (41.9%) 20 (37.7%) 48 (39.7%)
CO-RADS
CO-RADS 1 230 (97.5%) 61 (98.4%) 51 (96.2%) 118 (97.5%)
CO-RADS 2 6 (2.5%) 1 (1.6%) 2 (3.8%) 3 (2.5%)
Glucose (mg/dL)
Median [Q1, Q3] 83.0 [74.0, 92.0] 83.0 [77.0, 90.0] 81.0 [70.0, 92.0] 83.0 [74.0, 92.0]
Creatinine (mg/dL)
Mean (SD) 0.758 (0.146) 0.773 (0.115) 0.744 (0.144) 0.757 (0.160)
Urea (mg/dL)
Mean (SD) 21.4 (6.70) 22.9 (6.08) 20.5 (6.77) 21.1 (6.89)
Hemoglobin (g/dL)
Mean (SD) 14.5 (1.21) 14.5 (1.20) 14.5 (1.17) 14.6 (1.24)
Hematocrit (%)
Mean (SD) 42.8 (3.33) 42.6 (3.32) 42.6 (3.22) 42.9 (3.41)
WBC count (10³/µL)
Mean (SD) 7.83 (1.76) 7.81 (1.74) 7.71 (1.76) 7.89 (1.78)
Neutrophils (absolute) (10³/µL)
Mean (SD) 4.97 (1.42) 4.94 (1.39) 4.83 (1.39) 5.04 (1.46)
Lymphocytes (absolute) (10³/µL)
Mean (SD) 2.70 (0.811) 2.71 (0.802) 2.70 (0.920) 2.69 (0.771)
Monocytes (absolute) (10³/µL)
Mean (SD) 2.70 (0.811) 2.71 (0.802) 2.70 (0.920) 2.69 (0.771)
Platelets (cells/µL)
Mean (SD) 316 (64.4) 307 (67.6) 319 (63.2) 320 (63.2)

NOTE: The ASA physical status variable has not been included in analyses since the updated version of ASA consulted on October 2023 classifies obesity (30<BMI<40) as ASA 2 and obesity (BMI ≥40) as ASA 3. The distribution of frequencies of ASA~obesity class in this dataset does not match such definition. This occurred since an outdated version of ASA that did not include obesity was likely used by clinicians when writing the preoperative assessment medical note:

table(data$ASA,data$type_obesity)
##        
##         Class 1 Obesity Class 2 Obesity Class 3 Obesity
##   ASA 1              31              18               3
##   ASA 2              29              34              85
##   ASA 3               0               0              32